package io.gbznt.modules.sys.constant;

/**
 * 部门类型；
 */
public enum DeptTypeEnum {
	/**
	 * 部门
	 */
	NORMAL(0,"部门"),
	/**
	 * 基地
	 */
	AREA(1,"基地");


	private final int value;

	private final String description;

	private DeptTypeEnum(int value, String description) {
		this.value = value;
		this.description = description;
	}

	public int getValue() {
		return value;
	}

	public String getDescription() {
		return description;
	}
	
	public static DeptTypeEnum getByValue(Integer value) {
		if (null == value) {
            return null;
        }
		for (DeptTypeEnum enumObj : DeptTypeEnum.values()) {
			if (value.equals(enumObj.getValue())) {
                return enumObj;
            }
		}
		return null;
	}
	
	public static DeptTypeEnum getByDesc(String description) {
		if (null == description) {
            return null;
        }
		for (DeptTypeEnum enumObj : DeptTypeEnum.values()) {
			if (description.equals(enumObj.getDescription())) {
                return enumObj;
            }
		}
		return null;
	}
	
}